<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>图书管理系统</title>

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container mt-5">
    <div class="d-flex justify-content-between align-items-center mb-4">
        <h1>图书管理系统</h1>
        <button class="btn btn-primary" onclick="window.location.href='add-book.html'">
            <i class="bi bi-plus-circle"></i> 新增图书
        </button>
    </div>

    <div class="mb-4">
        <div class="input-group">
            <input type="text" id="searchInput" class="form-control" placeholder="搜索书名、作者或ISBN...">
            <button class="btn btn-secondary" onclick="searchBooks()">搜索</button>
            <button class="btn btn-outline-secondary" onclick="resetSearch()">重置</button>
        </div>
    </div>

    <table class="table table-striped table-hover">
        <thead class="table-dark">
        <tr>
            <th>ID</th>
            <th>书名</th>
            <th>作者</th>
            <th>ISBN</th>
            <th>分类</th>
            <th>库存</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody id="bookTableBody">

        <tr><td colspan="7" class="text-center">加载中...</td></tr>
        </tbody>
    </table>


    <nav aria-label="Page navigation">
        <ul class="pagination justify-content-center" id="pagination">

        </ul>
    </nav>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
<script src="js/common.js"></script>
<script src="js/index.js"></script>
</body>
</html>